﻿using System.ComponentModel.Composition;
using SS.Common.Map.MapProvider;

namespace SS.Common.Map
{
    /// <summary>
    /// The class implements interface IMapConsumer 
    /// that is used to provide the means to consume Map services (Google, Bing,...)
    /// </summary>
    [Export(typeof(IMapConsumer))]
    [PartCreationPolicy(CreationPolicy.Shared)]
    public class MapConsumer: IMapConsumer
    {
        #region Implementation of IMapConsumer

        public IMapProvider Map(EMap mapType)
        {
            IMapProvider instance = null;
            switch (mapType)
            {
                case EMap.Google:
                    instance = new GoogleMapProvider();
                    break;

                case EMap.Ping:
                    break;
            }
            return instance;
        }

        #endregion
    }
}